/*
 * * Seccion 2 equipo 5
 * 
 * Robinson Garrido
 * Morelav Varela
 * Jose Ferreira
 * Andreina Sequera
 */

package principal;

import java.util.Vector;

import vista.Menu;

public class Principal {
	
	public static String generar(Vector<String> campos, Vector valores,String tabla){
		String tira= "INSERT INTO "+tabla+" (";
		String ultimoC = campos.lastElement();
		for(String field: campos)
			if(field.equals(ultimoC))
				tira+=field+") VALUES (";
			else
				tira+=field+",";
		Object ultimoV = valores.lastElement();
		for(Object value: valores)
			if(!value.equals(ultimoV))
				if(!(value instanceof String))
					tira+=""+value+",";
				else
					tira+="'"+value+"',";
			else
				if(!(value instanceof String))
					tira+=""+value+")";
				else
					tira+="'"+value+"')";
		return tira;
	}

    
	
	
    public static void main(String[] args) {
        //new Menu().show();
    	
    	
    }

}
